﻿namespace CommonData.Model.Core
{
    using System;

    public sealed class TableAttribute : Attribute
    {
        private string dBName;
        private string information;
        private bool isInternal;
        private string name;
        private string primaryKeyName;
        private string version;

        public TableAttribute()
        {
            this.primaryKeyName = "";
            this.information = "";
            this.isInternal = false;
            this.version = "V1.0";
        }

        public TableAttribute(string name, string dBName, string primaryKeyName, bool isInternal)
        {
            this.primaryKeyName = "";
            this.information = "";
            this.isInternal = false;
            this.version = "V1.0";
            this.name = name;
            this.dBName = dBName;
            this.primaryKeyName = primaryKeyName;
            this.isInternal = isInternal;
        }

        public TableAttribute(string name, string dBName, string primaryKeyName, string information, bool isInternal, string version)
        {
            this.primaryKeyName = "";
            this.information = "";
            this.isInternal = false;
            this.version = "V1.0";
            this.name = name;
            this.dBName = dBName;
            this.primaryKeyName = primaryKeyName;
            this.information = information;
            this.isInternal = isInternal;
            this.version = version;
        }

        public string DBName
        {
            get
            {
                return this.dBName;
            }
            set
            {
                this.dBName = value;
            }
        }

        public string Information
        {
            get
            {
                return this.information;
            }
            set
            {
                this.information = value;
            }
        }

        public bool IsInternal
        {
            get
            {
                return this.isInternal;
            }
            set
            {
                this.isInternal = value;
            }
        }

        public string Name
        {
            get
            {
                return this.name;
            }
            set
            {
                this.name = value;
            }
        }

        public string PrimaryKeyName
        {
            get
            {
                return this.primaryKeyName;
            }
            set
            {
                this.primaryKeyName = value;
            }
        }

        public string Version
        {
            get
            {
                return this.version;
            }
            set
            {
                this.version = value;
            }
        }
    }
}

